using System;
using System.Runtime.Serialization;
using YunBox2.Contracts.Core;

namespace YunBox2.Contracts.FoundationModels
{
    public class Department : DomainObject
    {

        [DataMember]
        public virtual Guid? ID
        {
            get;
            set;
        }

        [DataMember]
        public virtual User LastModifiedUser
        {
            get;
            set;
        }

        [DataMember]
        public virtual DateTime? LastModified
        {
            get;
            set;
        }
        public string Name
        {
            get;
            set;
        }

        public string SerialNo
        {
            get;
            set;
        }

        public Department Parent
        {
            get;
            set;
        }

        public bool IsRoot
        {
            get
            {
                return Parent == null;
            }
        }
    }
}
